<?php
/**
 * [WeEngine System] Copyright (c) 2013 WE7.CC
 */
defined('IN_IA') or exit('Access Denied');

class kuyuan_vbzModuleProcessor extends WeModuleProcessor {
	public function respond() {
		//获取回复内容
		require_once MODULE_ROOT.'/vendor/autoload.php';
		global $_W;
		$_content = $this->message['content'];
		$Activity = new \Model\ActivityMod();
		$_one = $Activity->findOne(array('response_keyword'=>$_content,'uniacid'=>$_W['account']['uniacid']),array('id','name','address','cover','brief'));
		return $this->respNews(array(
			'Title'=>$_one['name'],
			'Description'=>($_one['brief']!='') ? $_one['brief'] : '活动地址:'.$_one['address'],
			'Url'=>murl('entry//index',array('m'=>'kuyuan_vbz','activity_id'=>$_one['id'],'share_uid'=>0,'route'=>urlencode('#/activity/'.$_one['id'].'/0')),true,true),
			'PicUrl'=>tomedia($_one['cover'])
		));
	}
}
